home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_311 / incr / incr.doc < prev    next >
Text File  |  1992-05-06  |  5KB  |  105 lines

  1.  
  2.        Program:  incr
  3.     Programmer:  George Kerber
  4.        Written:  07/24/89 - 08/06/89
  5.        Version:  1.03
  6.    Application:  AmigaDOS
  7.        Purpose:  This utility increment the value in a specified file by
  8.                  one or create the file and save an initial value of 0 if
  9.                  the file does not exist.  incr will also display the
  10.                  stored value un-incremented or before/after.
  11.  
  12.         SYNTAX:  incr [[-a|-b|-d -s -n -#] [path]filename ]
  13.  
  14.                       ?   Or no option, a help screen will be displayed.
  15.                      -a   The stored value will be displayed after
  16.                           it has been incremented.
  17.                      -b   The stored value will be displayed before
  18.                           incrementing the value.
  19.                      -s   The stored value will be displayed, the value
  20.                           will not be incremented.
  21.                      -n   A newline will not we output.
  22.                      -d   The incr file will be unconditionally deleted.
  23.                           (if exists, no warning messages are given.)
  24.                      -1   White.
  25.                      -2   Black.
  26.                      -3   Orange.
  27.                      -4   Default colors & attributes.
  28.                      -5   Boldface.
  29.                      -6   Underline.
  30.                      -7   Italics.
  31.  
  32.   Installation:  Simply copy incr to your c: directory.  Or execute
  33.                  the install script called incr.install.
  34.  
  35.                            execute incr.install
  36.  
  37.     Directions:  Execute incr with a filename.  If this filename doesn't
  38.                  exist, incr will create the file and place a 0 in the file.
  39.                  If the filename exists and contains a numeric value, the
  40.                  value will be incremented and written back to the file.
  41.  
  42.                  CAUTION:  incr only does simple checks on the specified
  43.                            file to insure that it is really an incr file.
  44.                            So if you give a filename that isn't an incr
  45.                            file it may be overwritten.  Too bad....
  46.  
  47.                  If you use the -s option, the value will simply be displayed
  48.                  and the file will remain unchanged.  Using either the 
  49.                  -a (after) or the -b (before) option will display the value
  50.                  either before or after it has been incremented.
  51.  
  52.                  If the -n option is used, a newline will not be
  53.                  performed after the value is displayed.  This option
  54.                  works the same as the NOLINE option for the AmigaDOS echo
  55.                  command
  56.  
  57.                  If no path is given for the filename, incr will use the
  58.                  s:incr directory for all files.  If the directory doesn't
  59.                  exist, incr will create it.  Using a full pathname on the
  60.                  filename will allow the user to specify where the file is
  61.                  to be stored.
  62.  
  63.       
  64.       Examples:  So what good is it?
  65.  
  66.                  Try adding these lines to your startup-sequence.
  67.                  
  68.                  ....
  69.                  echo " You have booted from this disk " NOLINE
  70.                  incr -a -n boot 
  71.                  echo " times before.
  72.                  ....
  73.       
  74.  
  75.                  If you execute anything from a batch file, you can keep
  76.                  track of the number of times you have executed the file.
  77.  
  78.                  -----------------------------------------------------------
  79.  
  80.                  What if you want a batch file to execute something every
  81.                  20 times you run it?  Use the boot.incr file you
  82.                  created in the last example.
  83.  
  84.                  ....
  85.                  eval <s:incr/boot.incr >nil: to env:boot value2 20 op mod ?
  86.                  if $boot eq 0 VAL
  87.                     ....
  88.                     echo "it's time to do whatever you want done every"
  89.                     echo "twenty times this disk is booted up"
  90.                     ....
  91.                     endif
  92.  
  93.                  -----------------------------------------------------------
  94.                   
  95.                  Get the idea.....
  96.  
  97.  
  98.         Status:  This is public domain, but please keep me as author and
  99.                  keep all the documentation intact.  Anyway, if something
  100.                  is wrong with this program, I'm not responsible.....
  101.  
  102.  
  103.        History:  v1.00  Initial release.
  104.                  v1.03  Added options and a default directory.
  105.